//地址管理相关接口
import request from '@/utils/request_app'

// 获取用户地址list
export const getaddressList = data => {
  return request({
    url: '/mpapi/api/address/list',//app/user/address/list
    method: 'get',
    params:data,
  })
}

// 添加 用户地址
export const addUserAddressApi = data => {
  return request({
    url: 'app/user/address',
    method: 'post',
    data: data,
  })
}

// 修改 用户地址
export const updateUserAddressApi = data => {
  return request({
    url: 'app/user/address/update',
    method: 'post',
    data: data,
  })
}

// 删除用户地址信息
export const delUserAddressApi = data => {
  return request({
    url: `/mpapi/api/address/del`,
    method: 'post',
    data:data
  })
}

// 修改默认地址
export const changeDefaultAddressApi = data => {
  return request({
    url: `/mpapi/api/address/default/set`,
    method: 'post',
    data:data
  })
}
